package com.gzzq.service;

import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Component;

@Component
public class AutoConsumer {
        // 使用JmsListener配置消费者监听的队列，其中text是接收到的消息
	@JmsListener(destination = "default")
	public void receiveQueue(String text) {
		System.out.println("Consumer收到的报文为:"+text);
	}
}
